package cn.mooncode.basketballManage.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 * <p>
 *
 * </p>
 *
 * @author jwz
 * @since 2021-03-28
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("t_train")
@ApiModel(value = "Train对象", description = "")
public class Train implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "训练表主键")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "训练开始时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai")
    private LocalDateTime createTime;

    @ApiModelProperty(value = "训练结束时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai")
    private LocalDateTime endTime;

    @ApiModelProperty(value = "备注")
    private String remark;

    @ApiModelProperty(value = "训练结果")
    private String result;

    @ApiModelProperty(value = "球队信息")
    @TableField(exist = false)
    private Team teamInfo;

    @ApiModelProperty(value = "场地信息")
    @TableField(exist = false)
    private Space space;


}
